package com.crayon.account.fragmentspop;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;

import com.crayon.sharemenu.R;
import com.crayon.util.UIBIND;

public class FragmentPoplist extends Fragment implements OnCheckedChangeListener{


	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View viewGroup = (View)inflater.inflate(R.layout.fragment_pop_list, container, false);
		RadioGroup radioGroup = (RadioGroup)UIBIND.bindView(viewGroup, R.id.radioGroup);
		radioGroup.setOnCheckedChangeListener(this);
		return viewGroup;	
	}



	@Override
	public void onActivityCreated(Bundle arg0) {
		// TODO Auto-generated method stub
		super.onActivityCreated(arg0);
		
		RadioGroup radioGroup = (RadioGroup)UIBIND.bindView(getView(), R.id.radioGroup);
		
//		for(RadioButton button : getBindItemButtons().OnSupportItems()){
//			radioGroup.addView(button);
//		}
	}

	@Override
	public void onCheckedChanged(RadioGroup group, int checkedId) {
		// TODO Auto-generated method stub
//		if(group.getId()==R.id.radioGroup){
//			getBindItemButtons().OnRadioCheckedListner(group, checkedId);
//		}
		getActivity().onBackPressed();;
		
	}


}
